Integrand size = 20, antiderivative size = 331 \[ \int \frac {x^2}{a+b+2 a x^2+a x^4} \, dx=-\frac {\arctan \left (\frac {\sqrt {-\sqrt {a}+\sqrt {a+b}}-\sqrt {2} \sqrt [4]{a} x}{\sqrt {\sqrt {a}+\sqrt {a+b}}}\right )}{2 \sqrt {2} a^{3/4} \sqrt {\sqrt {a}+\sqrt {a+b}}}+\frac {\arctan \left (\frac {\sqrt {-\sqrt {a}+\sqrt {a+b}}+\sqrt {2} \sqrt [4]{a} x}{\sqrt {\sqrt {a}+\sqrt {a+b}}}\right )}{2 \sqrt {2} a^{3/4} \sqrt {\sqrt {a}+\sqrt {a+b}}}+\frac {\log \left (\sqrt {a+b}-\sqrt {2} \sqrt [4]{a} \sqrt {-\sqrt {a}+\sqrt {a+b}} x+\sqrt {a} x^2\right )}{4 \sqrt {2} a^{3/4} \sqrt {-\sqrt {a}+\sqrt {a+b}}}-\frac {\log \left (\sqrt {a+b}+\sqrt {2} \sqrt [4]{a} \sqrt {-\sqrt {a}+\sqrt {a+b}} x+\sqrt {a} x^2\right )}{4 \sqrt {2} a^{3/4} \sqrt {-\sqrt {a}+\sqrt {a+b}}} \]
[Out]
Time = 0.15 (sec) , antiderivative size = 331, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1143, 648, 632, 210, 642} \[ \int \frac {x^2}{a+b+2 a x^2+a x^4} \, dx=-\frac {\arctan \left (\frac {\sqrt {\sqrt {a+b}-\sqrt {a}}-\sqrt {2} \sqrt [4]{a} x}{\sqrt {\sqrt {a+b}+\sqrt {a}}}\right )}{2 \sqrt {2} a^{3/4} \sqrt {\sqrt {a+b}+\sqrt {a}}}+\frac {\arctan \left (\frac {\sqrt {\sqrt {a+b}-\sqrt {a}}+\sqrt {2} \sqrt [4]{a} x}{\sqrt {\sqrt {a+b}+\sqrt {a}}}\right )}{2 \sqrt {2} a^{3/4} \sqrt {\sqrt {a+b}+\sqrt {a}}}+\frac {\log \left (-\sqrt {2} \sqrt [4]{a} x \sqrt {\sqrt {a+b}-\sqrt {a}}+\sqrt {a+b}+\sqrt {a} x^2\right )}{4 \sqrt {2} a^{3/4} \sqrt {\sqrt {a+b}-\sqrt {a}}}-\frac {\log \left (\sqrt {2} \sqrt [4]{a} x \sqrt {\sqrt {a+b}-\sqrt {a}}+\sqrt {a+b}+\sqrt {a} x^2\right )}{4 \sqrt {2} a^{3/4} \sqrt {\sqrt {a+b}-\sqrt {a}}} \]
[In]
[Out]
Rule 210
Rule 632
Rule 642
Rule 648
Rule 1143
Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {x}{\frac {\sqrt {a+b}}{\sqrt {a}}-\frac {\sqrt {2} \sqrt {-\sqrt {a}+\sqrt {a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{2 \sqrt {2} a^{3/4} \sqrt {-\sqrt {a}+\sqrt {a+b}}}-\frac {\int \frac {x}{\frac {\sqrt {a+b}}{\sqrt {a}}+\frac {\sqrt {2} \sqrt {-\sqrt {a}+\sqrt {a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{2 \sqrt {2} a^{3/4} \sqrt {-\sqrt {a}+\sqrt {a+b}}} \\ & = \frac {\int \frac {1}{\frac {\sqrt {a+b}}{\sqrt {a}}-\frac {\sqrt {2} \sqrt {-\sqrt {a}+\sqrt {a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{4 a}+\frac {\int \frac {1}{\frac {\sqrt {a+b}}{\sqrt {a}}+\frac {\sqrt {2} \sqrt {-\sqrt {a}+\sqrt {a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{4 a}+\frac {\int \frac {-\frac {\sqrt {2} \sqrt {-\sqrt {a}+\sqrt {a+b}}}{\sqrt [4]{a}}+2 x}{\frac {\sqrt {a+b}}{\sqrt {a}}-\frac {\sqrt {2} \sqrt {-\sqrt {a}+\sqrt {a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{4 \sqrt {2} a^{3/4} \sqrt {-\sqrt {a}+\sqrt {a+b}}}-\frac {\int \frac {\frac {\sqrt {2} \sqrt {-\sqrt {a}+\sqrt {a+b}}}{\sqrt [4]{a}}+2 x}{\frac {\sqrt {a+b}}{\sqrt {a}}+\frac {\sqrt {2} \sqrt {-\sqrt {a}+\sqrt {a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{4 \sqrt {2} a^{3/4} \sqrt {-\sqrt {a}+\sqrt {a+b}}} \\ & = \frac {\log \left (\sqrt {a+b}-\sqrt {2} \sqrt [4]{a} \sqrt {-\sqrt {a}+\sqrt {a+b}} x+\sqrt {a} x^2\right )}{4 \sqrt {2} a^{3/4} \sqrt {-\sqrt {a}+\sqrt {a+b}}}-\frac {\log \left (\sqrt {a+b}+\sqrt {2} \sqrt [4]{a} \sqrt {-\sqrt {a}+\sqrt {a+b}} x+\sqrt {a} x^2\right )}{4 \sqrt {2} a^{3/4} \sqrt {-\sqrt {a}+\sqrt {a+b}}}-\frac {\text {Subst}\left (\int \frac {1}{-2 \left (1+\frac {\sqrt {a+b}}{\sqrt {a}}\right )-x^2} \, dx,x,-\frac {\sqrt {2} \sqrt {-\sqrt {a}+\sqrt {a+b}}}{\sqrt [4]{a}}+2 x\right )}{2 a}-\frac {\text {Subst}\left (\int \frac {1}{-2 \left (1+\frac {\sqrt {a+b}}{\sqrt {a}}\right )-x^2} \, dx,x,\frac {\sqrt {2} \sqrt {-\sqrt {a}+\sqrt {a+b}}}{\sqrt [4]{a}}+2 x\right )}{2 a} \\ & = -\frac {\tan ^{-1}\left (\frac {\sqrt {-\sqrt {a}+\sqrt {a+b}}-\sqrt {2} \sqrt [4]{a} x}{\sqrt {\sqrt {a}+\sqrt {a+b}}}\right )}{2 \sqrt {2} a^{3/4} \sqrt {\sqrt {a}+\sqrt {a+b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {-\sqrt {a}+\sqrt {a+b}}+\sqrt {2} \sqrt [4]{a} x}{\sqrt {\sqrt {a}+\sqrt {a+b}}}\right )}{2 \sqrt {2} a^{3/4} \sqrt {\sqrt {a}+\sqrt {a+b}}}+\frac {\log \left (\sqrt {a+b}-\sqrt {2} \sqrt [4]{a} \sqrt {-\sqrt {a}+\sqrt {a+b}} x+\sqrt {a} x^2\right )}{4 \sqrt {2} a^{3/4} \sqrt {-\sqrt {a}+\sqrt {a+b}}}-\frac {\log \left (\sqrt {a+b}+\sqrt {2} \sqrt [4]{a} \sqrt {-\sqrt {a}+\sqrt {a+b}} x+\sqrt {a} x^2\right )}{4 \sqrt {2} a^{3/4} \sqrt {-\sqrt {a}+\sqrt {a+b}}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.08 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.43 \[ \int \frac {x^2}{a+b+2 a x^2+a x^4} \, dx=\frac {\frac {\left (i \sqrt {a}+\sqrt {b}\right ) \arctan \left (\frac {\sqrt {a} x}{\sqrt {a-i \sqrt {a} \sqrt {b}}}\right )}{\sqrt {a-i \sqrt {a} \sqrt {b}}}+\frac {\left (-i \sqrt {a}+\sqrt {b}\right ) \arctan \left (\frac {\sqrt {a} x}{\sqrt {a+i \sqrt {a} \sqrt {b}}}\right )}{\sqrt {a+i \sqrt {a} \sqrt {b}}}}{2 \sqrt {a} \sqrt {b}} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.10 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.12
method | result | size |
risch | \(\frac {\munderset {\textit {\_R} =\operatorname {RootOf}\left (a \,\textit {\_Z}^{4}+2 a \,\textit {\_Z}^{2}+a +b \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (x -\textit {\_R} \right )}{\textit {\_R}^{3}+\textit {\_R}}}{4 a}\) | \(41\) |
default | \(\frac {\sqrt {2 \sqrt {a^{2}+a b}-2 a}\, \left (\sqrt {a^{2}+a b}+a \right ) \left (\frac {\ln \left (-x^{2} \sqrt {a}+x \sqrt {2 \sqrt {a \left (a +b \right )}-2 a}-\sqrt {a +b}\right )}{2 \sqrt {a}}-\frac {\sqrt {2 \sqrt {a \left (a +b \right )}-2 a}\, \arctan \left (\frac {-2 x \sqrt {a}+\sqrt {2 \sqrt {a \left (a +b \right )}-2 a}}{\sqrt {4 \sqrt {a}\, \sqrt {a +b}-2 \sqrt {a \left (a +b \right )}+2 a}}\right )}{\sqrt {a}\, \sqrt {4 \sqrt {a}\, \sqrt {a +b}-2 \sqrt {a \left (a +b \right )}+2 a}}\right )}{4 a b}-\frac {\sqrt {2 \sqrt {a^{2}+a b}-2 a}\, \left (\sqrt {a^{2}+a b}+a \right ) \left (\frac {\ln \left (x^{2} \sqrt {a}+x \sqrt {2 \sqrt {a \left (a +b \right )}-2 a}+\sqrt {a +b}\right )}{2 \sqrt {a}}-\frac {\sqrt {2 \sqrt {a \left (a +b \right )}-2 a}\, \arctan \left (\frac {2 x \sqrt {a}+\sqrt {2 \sqrt {a \left (a +b \right )}-2 a}}{\sqrt {4 \sqrt {a}\, \sqrt {a +b}-2 \sqrt {a \left (a +b \right )}+2 a}}\right )}{\sqrt {a}\, \sqrt {4 \sqrt {a}\, \sqrt {a +b}-2 \sqrt {a \left (a +b \right )}+2 a}}\right )}{4 a b}\) | \(339\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 279, normalized size of antiderivative = 0.84 \[ \int \frac {x^2}{a+b+2 a x^2+a x^4} \, dx=\frac {1}{4} \, \sqrt {\frac {a b \sqrt {-\frac {1}{a^{3} b}} + 1}{a b}} \log \left (a^{2} b \sqrt {\frac {a b \sqrt {-\frac {1}{a^{3} b}} + 1}{a b}} \sqrt {-\frac {1}{a^{3} b}} + x\right ) - \frac {1}{4} \, \sqrt {\frac {a b \sqrt {-\frac {1}{a^{3} b}} + 1}{a b}} \log \left (-a^{2} b \sqrt {\frac {a b \sqrt {-\frac {1}{a^{3} b}} + 1}{a b}} \sqrt {-\frac {1}{a^{3} b}} + x\right ) - \frac {1}{4} \, \sqrt {-\frac {a b \sqrt {-\frac {1}{a^{3} b}} - 1}{a b}} \log \left (a^{2} b \sqrt {-\frac {a b \sqrt {-\frac {1}{a^{3} b}} - 1}{a b}} \sqrt {-\frac {1}{a^{3} b}} + x\right ) + \frac {1}{4} \, \sqrt {-\frac {a b \sqrt {-\frac {1}{a^{3} b}} - 1}{a b}} \log \left (-a^{2} b \sqrt {-\frac {a b \sqrt {-\frac {1}{a^{3} b}} - 1}{a b}} \sqrt {-\frac {1}{a^{3} b}} + x\right ) \]
[In]
[Out]
Time = 0.32 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.13 \[ \int \frac {x^2}{a+b+2 a x^2+a x^4} \, dx=\operatorname {RootSum} {\left (256 t^{4} a^{3} b^{2} - 32 t^{2} a^{2} b + a + b, \left ( t \mapsto t \log {\left (64 t^{3} a^{2} b - 4 t a + x \right )} \right )\right )} \]
[In]
[Out]
\[ \int \frac {x^2}{a+b+2 a x^2+a x^4} \, dx=\int { \frac {x^{2}}{a x^{4} + 2 \, a x^{2} + a + b} \,d x } \]
[In]
[Out]
none
Time = 0.37 (sec) , antiderivative size = 203, normalized size of antiderivative = 0.61 \[ \int \frac {x^2}{a+b+2 a x^2+a x^4} \, dx=-\frac {{\left (3 \, \sqrt {a^{2} + \sqrt {-a b} a} \sqrt {-a b} a + 4 \, \sqrt {a^{2} + \sqrt {-a b} a} \sqrt {-a b} b\right )} {\left | a \right |} \arctan \left (\frac {2 \, \sqrt {\frac {1}{2}} x}{\sqrt {\frac {2 \, a + \sqrt {-4 \, {\left (a + b\right )} a + 4 \, a^{2}}}{a}}}\right )}{2 \, {\left (3 \, a^{4} b + 4 \, a^{3} b^{2}\right )}} + \frac {{\left (3 \, \sqrt {a^{2} - \sqrt {-a b} a} \sqrt {-a b} a + 4 \, \sqrt {a^{2} - \sqrt {-a b} a} \sqrt {-a b} b\right )} {\left | a \right |} \arctan \left (\frac {2 \, \sqrt {\frac {1}{2}} x}{\sqrt {\frac {2 \, a - \sqrt {-4 \, {\left (a + b\right )} a + 4 \, a^{2}}}{a}}}\right )}{2 \, {\left (3 \, a^{4} b + 4 \, a^{3} b^{2}\right )}} \]
[In]
[Out]
Time = 0.30 (sec) , antiderivative size = 222, normalized size of antiderivative = 0.67 \[ \int \frac {x^2}{a+b+2 a x^2+a x^4} \, dx=-2\,\mathrm {atanh}\left (\frac {2\,\left (x\,\left (4\,a^2\,b-4\,a^3\right )+\frac {4\,a\,x\,\left (\sqrt {-a^3\,b^3}+a^2\,b\right )}{b}\right )\,\sqrt {\frac {\sqrt {-a^3\,b^3}+a^2\,b}{16\,a^3\,b^2}}}{2\,a^2+2\,b\,a}\right )\,\sqrt {\frac {\sqrt {-a^3\,b^3}+a^2\,b}{16\,a^3\,b^2}}-2\,\mathrm {atanh}\left (\frac {2\,\left (x\,\left (4\,a^2\,b-4\,a^3\right )-\frac {4\,a\,x\,\left (\sqrt {-a^3\,b^3}-a^2\,b\right )}{b}\right )\,\sqrt {-\frac {\sqrt {-a^3\,b^3}-a^2\,b}{16\,a^3\,b^2}}}{2\,a^2+2\,b\,a}\right )\,\sqrt {-\frac {\sqrt {-a^3\,b^3}-a^2\,b}{16\,a^3\,b^2}} \]
[In]
[Out]